import 'package:flutter/cupertino.dart';
import 'package:mobile_app.core/core/presentation/navigator_keys.dart';
import 'package:modal_bottom_sheet/modal_bottom_sheet.dart';

Future<T?> showAppFullscreenModal<T>({
  required WidgetBuilder builder,
  bool enableDrag = true,
}) {
  return showCupertinoModalBottomSheet<T>(
    context: rootNavigatorKey.currentContext!,
    builder: builder,
    expand: true,
    enableDrag: enableDrag,
    isDismissible: false,
  );
}

Future<T?> showAppActionDialog<T>({
  required BuildContext context,
  required WidgetBuilder builder,
  bool useRootNavigator = true,
}) {
  return showCupertinoModalPopup<T>(
    context: context,
    builder: builder,
    useRootNavigator: useRootNavigator,
  );
}

Future<T?> showAppAlertDialog<T>({
  required BuildContext context,
  required WidgetBuilder builder,
  bool useRootNavigator = true,
}) {
  return showCupertinoDialog<T>(
    context: context,
    builder: builder,
    useRootNavigator: useRootNavigator,
  );
}
